fix(goal): tolerate vanished-session message windows, surface loop failures - #283
Merged
Conversation
release: dev → main (goal turn-scope, hook headers, tui question tabs)
…ilures Root cause of the invisible goal stall: the afterIdle evaluation died on a typed NotFoundError from the messages-window read (session row gone mid-goal, or a synthetic session), and the fork's bare Effect.ignore swallowed it — goal left permanently active, turns_used frozen at 0, zero logs. - afterIdle + zombie probe + post-judge reload: NotFoundError on any of the three messages windows degrades to an empty window (MessageV2.stream pattern) so the existing visible branches handle it (pause / continuation) - triggerEvaluation fork: Effect.ignore -> catchCause + logWarning (interrupts stay silent per F1) so future evaluation failures are diagnosable - judge chain: orElseSucceed -> catchCause so DEFECTS in the production provider chain (config orDie, payload decode) fold into the parseFailed budget instead of silently killing the evaluation - auto-pause transcript line: ignore -> catchCause + logWarning (symmetric with the done branch) - P2-B comment corrected: effect v4 Effect.ignore absorbs defects too; catchCause's value here is diagnosability, not subscription survival - regression tests: production-wiring probe (bootstrap-wiring.test.ts), pre-judge window pause, post-judge reload tolerance (GOAL-FP-01-18), judge-defect budget degradation (GOAL-FP-01-18b) - lint: new code is warning-neutral; drop 11 pre-existing unused imports to restore gate margin (oxlint ratchet, local 4846 -> 4829)
LeXwDeX
force-pushed
the
fix/goal-visibility
branch
from
August 15, 2026 18:51
bd64abc to
53a2ad3
Compare
This was referenced Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Goal 状态机静默卡死:
afterIdle在 lease claim 后读取消息窗口(sessions.messages({limit:20})),当 session 行不存在中被删除或合成会话)时,MessageV2.page抛NotFoundError。该 typed failure 逃逸后被triggerEvaluationfork 处的Effect.ignore静默吞噬——goal 永久 active、零日志、turns_used恒 0。生产事故 + 复现探针(bootstrap-wiring.test.ts,走 AppRuntime→InstanceStore→bootstrap.run 生产装配)证实断点;僵尸守卫的messages({limit:1})有同样隐患。Fix
NotFoundError视为空窗口(与MessageV2.stream同模式)→ 走已有的「无 assistant → 可见 pause」分支Effect.ignore换成catchCause + logWarning(interrupt 保持静默,F1 纪律),任何 afterIdle 失败可诊断Evidence
bun typecheck干净;test/goal101 pass / 0 fail(90 既有 + 探针 + 新用例)